package top.lixunda.commerce.common.core.controller.wrapper;

import java.io.Serializable;
import java.util.List;
import java.util.Map;

/**
 * @author LiXunda
 * @version time:2019/10/14 10:19
 */
@SuppressWarnings("unused")
public interface IAbstractSqlWrapper<T> extends Serializable {

    IAbstractSqlWrapper<T> groupBy(String... column);

    IAbstractSqlWrapper<T> orderBy(Map<String, String> map);

    IAbstractSqlWrapper<T> orderBy(String column, String value);

    IAbstractSqlWrapper<T> orderByAsc(String... columns);

    IAbstractSqlWrapper<T> orderByDesc(String... columns);

    IAbstractSqlWrapper<T> having(String column);

    IAbstractSqlWrapper<T> limit(int start, int count);

    IAbstractSqlWrapper<T> allEq(Map<String, Object> map);

    IAbstractSqlWrapper<T> eq(String column, Object value);

    IAbstractSqlWrapper<T> ne(String column, Object value);

    IAbstractSqlWrapper<T> gt(String column, Object value);

    IAbstractSqlWrapper<T> ge(String column, Object value);

    IAbstractSqlWrapper<T> lt(String column, Object value);

    IAbstractSqlWrapper<T> le(String column, Object value);

    IAbstractSqlWrapper<T> between(String column, Object value1, Object value2);

    IAbstractSqlWrapper<T> notBetween(String column, Object value1, Object value2);

    IAbstractSqlWrapper<T> like(String column, String value);

    IAbstractSqlWrapper<T> notLike(String column, String value);

    IAbstractSqlWrapper<T> likeLeft(String column, String value);

    IAbstractSqlWrapper<T> likeRight(String column, String value);

    IAbstractSqlWrapper<T> isNull(String... column);

    IAbstractSqlWrapper<T> isNotNull(String... column);

    IAbstractSqlWrapper<T> in(String column, List<?> values);

    IAbstractSqlWrapper<T> notIn(String column, List<?> values);

    IAbstractSqlWrapper<T> apply(String applySql, Object...params);

    IAbstractSqlWrapper<T> or();

    IAbstractSqlWrapper<T> and();

    IAbstractSqlWrapper<T> or(ConditionBlock sqlBlock);

    IAbstractSqlWrapper<T> and(ConditionBlock sqlBlock);

    EntityBlock<T> getEntityBlock();

    T getEntity();

    IAbstractSqlWrapper<T> setEntity(T t);

    ConditionBlock getConditionBlock();

    void setConditionBlock(ConditionBlock conditionBlock);

    ConditionBlock getNow();

    void setNow(ConditionBlock now);

    OtherBlock getOtherBlock();

    void setOtherBlock(OtherBlock otherBlock);

}
